
import payAppApi from '@/api/declaration/pay/payAppApi'
import httpRequest from '@/config/axios/httpRequest'
import { AppModel, AppPageReqModel, AppUpdateStatusReqModel } from '@/models/pay/AppModel'


// 查询列表支付应用
export const getAppPage = (params: AppPageReqModel) => {
  return httpRequest.get(payAppApi.GetAppPage, { params })
}

// 查询详情支付应用
export const getApp = (id: number) => {
  return httpRequest.get(payAppApi.GetApp, { params: { id } })
}

// 新增支付应用
export const createApp = (data: AppModel) => {
  return httpRequest.post(payAppApi.CreateApp, data)
}

// 修改支付应用
export const updateApp = (data: AppModel) => {
  return httpRequest.put(payAppApi.UpdateApp, data)
}

// 支付应用信息状态修改
export const changeAppStatus = (data: AppUpdateStatusReqModel) => {
  return httpRequest.put(payAppApi.ChangeAppStatus, data)
}

// 删除支付应用
export const deleteApp = (id: number) => {
  return httpRequest.delete(payAppApi.DeleteApp, { params: { id } })
}

// 获得支付应用列表
export const getAppList = () => {
  return httpRequest.get(payAppApi.GetAppList)
}
